﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>function Movement</title>
<meta name="GENERATOR" content="WinCHM">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

</head>

<body>
<P>function <STRONG>Movement</STRONG>()<BR>{<BR>&nbsp;<BR>&nbsp;&nbsp;if 
(Key.isDown (Key.RIGHT) 
)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;rick_mc.stance=1;<BR>&nbsp;&nbsp;&nbsp;rick_mc._x+=rick_mc.step;<BR>&nbsp;&nbsp;&nbsp;rick_mc.gotoAndStop("walk");<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;else 
if (Key.isDown (Key.LEFT) 
)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;rick_mc.stance=0;<BR>&nbsp;&nbsp;&nbsp;rick_mc._x-=rick_mc.step;<BR>&nbsp;&nbsp;&nbsp;rick_mc.gotoAndStop("walk");</P>
<P>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;else if (Key.isDown (Key.DOWN) 
)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;rick_mc.gotoAndStop("crouch");<BR>&nbsp;&nbsp;&nbsp;rick_mc.crouch=true;<BR>&nbsp;&nbsp;}&nbsp;&nbsp;<BR>&nbsp;&nbsp;else 
if (!Key.isDown () 
)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;rick_mc.gotoAndStop("stance");<BR>&nbsp;&nbsp;&nbsp;rick_mc.crouch=false;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;}<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;//Jump 
check needs to be out of the else..if loop or character<BR>&nbsp;&nbsp;//will 
not jump while walking.<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;if (Key.isDown 
(Key.UP))<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;rick_mc.gotoAndStop("jump");<BR>&nbsp;&nbsp;&nbsp;rick_mc.jump=true;<BR>&nbsp;&nbsp;}&nbsp;&nbsp;<BR>&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;if 
(Key.isDown (Key.CONTROL) &amp;&amp; 
keydown==false)<BR>&nbsp;&nbsp;{<BR>&nbsp;&nbsp;&nbsp;rick_mc.attack=true;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;}&nbsp;<BR>&nbsp;<BR>};</P></body>
</html>
